---
order: 0
title: Blender Baking
type: Art
label: Art
---

> **_Special thanks to Monk and UU Efficiency Team for providing this tutorial._**

In the process of actual model production, artists may use a lot of materials and textures to achieve better visual effects. However, there may be significant rendering discrepancies when exporting, and sometimes some effects may be lost.

We have optimized the process of maximizing the restoration of 3D model rendering as much as possible, hoping to help everyone.

### Blender Baking

1. Select the model. Currently, this building is composed of many different models, and we need to merge them into one model.

<Image src="https://gw.alipayobjects.com/zos/OasisHub/062ab80a-f13e-4bde-b916-61ed65150540/1635163063741-2a68da6a-bb53-47ef-8404-7f52c127c802.png" />

2. The shortcut to merge 2 models is **Ctrl+J**. If there are any models with modifiers, you need to apply the modifiers before merging; otherwise, the effects of the modifiers will be lost.

<Image src="https://gw.alipayobjects.com/zos/OasisHub/ba1e9e63-4bf9-431d-95e3-d508e79aad63/1635163542878-3653c3a0-e4f5-4a6c-b7b7-d7184c98a819.png" />

<Image src="https://gw.alipayobjects.com/zos/OasisHub/2178d932-f0f2-438a-9f8c-527d1f6f05fa/1635163601788-28030c1a-37cd-4713-ba7a-af822bc3933a.png" />

3. Start baking. Select the Shader Editor view, choose the material properties, and in the Node Editor (**Shift+A**) create: Texture -> Image Texture.

<Image src="https://gw.alipayobjects.com/zos/OasisHub/e2ba5925-225c-48fa-b9e7-250e6f4e64a0/1635164198831-1237a411-8897-4ad0-b992-33c8b2b4000c.png" />

4. Click on **New** and give it a suitable name. You can see the image texture you just created on the left side when expanded.

<Image src="https://gw.alipayobjects.com/zos/OasisHub/cd9518f4-a6cd-48f3-8b04-7e7dfd20e661/1635164520500-013dc671-1db1-44f2-94a2-7213e0c5c343.png" />

<Image src="https://gw.alipayobjects.com/zos/OasisHub/3864b696-e0f0-4511-a230-1ca067205f67/1635164571943-ab22c291-6e52-49f2-87d3-cacc1ba6d468.png" />

5. Copy this image texture you created to all material nodes under the building and make sure they are selected.

<Image src="https://gw.alipayobjects.com/zos/OasisHub/f92bd96d-4afd-42b5-b575-672461acb064/1635164645095-27735887-b48b-48ee-8877-c01efda281f2.png" />

6. Configure the baking parameters, but do not click on bake yet; we need the next step, UV.

<Image src="https://gw.alipayobjects.com/zos/OasisHub/38b7d00e-1363-420d-bbc0-a06b1cbbb5f1/1635164890110-0f3449bd-7109-4d22-b083-dc725797b93e.png" />

### Unwrapping UV

1. Enter UV Editing view, select the building model, press **Tab** to enter edit mode, and you will see that the UV is currently messy.

<Image src="https://gw.alipayobjects.com/zos/OasisHub/f98df575-2c59-4288-a567-0ecbc66c1548/1635164950027-7a66b660-7b1d-4e83-a499-b37ac64bb6a9.png" />

2. Select the intelligent UV projection by pressing **U**, click OK, and you will get a decent UV unwrap. Of course, if the artist has time, they can also do it manually.

<Image src="https://gw.alipayobjects.com/zos/OasisHub/e4d99da8-5173-4fea-81e1-11ad9f4bc0b8/1635165016801-c5692726-84ab-4362-a588-c21ed49740e0.png" alt="image.png" style={{ zoom: "67%" }} />

<Image src="https://gw.alipayobjects.com/zos/OasisHub/087c6da9-a38d-4cba-b321-58253235f6f3/1635165024292-fcb7096c-99b7-4ad7-ad22-8600c254294b.png" alt="image.png" style={{ zoom: "67%" }} />

<Image src="https://gw.alipayobjects.com/zos/OasisHub/f0bb451b-5055-483d-8c33-d4d4c7862a17/1635165041095-d025d34d-b94a-4dae-9748-f8204b69e6fb.png" alt="image.png" style={{ zoom: "67%" }} />

3. Return to the shader view, select the model layer and all materials under the layer, leave the baking parameters unchanged, and click Bake. There is a progress bar below, just wait patiently.

<Image src="https://gw.alipayobjects.com/zos/OasisHub/e8c439b1-4dc4-419e-abe4-ad7fb7a3b8e5/1635165107820-c9733262-2672-4d1a-ac01-0452ed71c440.png" />

4. After baking is complete, the image texture we created on the left has been baked. Press **alt+s** to quickly save this baked texture.

<Image src="https://gw.alipayobjects.com/zos/OasisHub/96becab7-74e3-4b2b-94e8-0c74bc5929d5/1635165192308-88c6f55f-faa6-4aa2-91c5-2b7114dbc3e8.png" />

### Exporting glTF File

1. Delete all materials of the above model, create a background material, and assign it.

<Image src="https://gw.alipayobjects.com/zos/OasisHub/3a5bac46-4ccd-4f1a-97d1-5dbb6998d4f5/1635165741680-26d4d4e5-737b-4bc7-9816-afcd532f9501.png" alt="image.png" style={{ zoom: "67%" }} />

<Image src="https://gw.alipayobjects.com/zos/OasisHub/a2d19c0a-79b9-4d51-b306-83a86d4388e4/1635165697839-5f88f82f-a66b-453d-970d-3398818ca8d8.png" />

2. Drag the house's baked image into the node view, and connect the color.

<Image src="https://gw.alipayobjects.com/zos/OasisHub/ad28062c-09f0-4586-8ca0-a927f94e57d0/1635165825176-cb680c0b-9126-47f8-8ee2-920df3831a89.png" />

3. Export in glTF format, make sure both layers' eyes and camera are enabled.

<Image src="https://gw.alipayobjects.com/zos/OasisHub/1590d92c-54ba-4efa-b6ca-6c2c3e8b95de/1635165880957-933cc281-8848-436f-a2af-186d818202d1.png" />

4. Preview the effect in the [glTF Viewer](https://galacean.antgroup.com/#/gltf-viewer).

<Image src="https://gw.alipayobjects.com/zos/OasisHub/81cfd9e4-474a-45dc-8133-de27a9c08dd6/1635166016557-59978f7f-6c91-4f13-99b3-9907e5c8cd44.png" />

Hope this helps everyone~
